Magnetic resonance method for characterizing fluid samples withdrawn from subsurface earth formations

ABSTRACT

Nuclear magnetic resonance techniques are used in a fluid sampling tool that extracts a fluid from subsurface earth formations into a flow channel within the tool. The magnetic resonance techniques involve applying a static magnetic field and an oscillating magnetic field to the fluid in the flow channel, and magnetic resonance signals are detected from the fluid and analyzed to extract information about the fluid such as composition, viscosity, etc.

[0001] The present application is a continuation-in-part of co-pendingU.S. application Ser. No. 09/133,234, filed on Aug. 13, 1998, which isincorporated herein in its entirety.

BACKGROUND OF THE INVENTION

[0002] 1. Field of the Invention

[0003] The present invention relates to well logging tools and methods,and more particularly to methods for analyzing extracted formationfluids by nuclear magnetic resonance (NMR) techniques.

[0004] 2. Background Information

[0005] Downhole formation fluid sampling tools, such as the SchlumbergerModular Formation Dynamics Tester (MDT), withdraw samples of fluids fromearth formations for subsequent analyses. These analyses are needed tocharacterize physical properties such as water and oil volume fractions,oil viscosity, and water salinity, among others. This knowledge isneeded to interpret wireline well logs, and to plan for the efficientexploitation of the reservoir.

[0006] In an undisturbed reservoir, formation fluids sometimes partiallysupport the overburden pressure of the earth. When a fluid-bearingformation is penetrated by drilling, formation fluids will flow into theborehole if it is at a lower pressure. The uncontrolled escape ofcombustible hydrocarbons to the surface (“blowout”) is extremelydangerous, so oil wells typically are drilled under pressure. Duringdrilling, fluid (“mud”) is circulated through the well to carry rockchips to the surface. The mud is densified with heavy minerals such asbarite (barium sulfate, 4.5 g/cm³) to ensure that borehole pressure ishigher than formation pressure. Consequently, fluid is forced into theformation from the borehole (“invasion”). Usually particles areprevented from entering the formation by the filtering action of theporous rock. Indeed, the filtration process is self-limiting becausesolids, purposely mixed in the drilling fluid, form a filter cake (“mudcake”) at the surface of the borehole. Nonetheless liquid (“mudfiltrate”) can penetrate quite deeply—as much as several meters into theformation. The filtrate can be either water with various soluble ions,or oil, depending on the type of mud used by the driller. Therefore, thefluid samples withdrawn are mixtures of native formation fluids(including gas, oil and/or water) and the filtrate of mud that was usedto drill the well.

[0007] Sample contamination of formation fluids by mud filtrate isuniversally regarded as the most serious problem associated withdownhole fluid sampling. It is essential that formation fluid, not mudfiltrate, is collected in the sample chambers of the tool. Thereforefluid from the formation is pumped through the tool and into theborehole until it is believed contamination has been reduced to anacceptable level. Thus it is necessary to detect mud filtrate in thefluid sample, to decide when to stop pumping the fluid through the tooland to start collecting it for analysis.

[0008] Several measurements are routinely made in fluid sampling toolsto detect mud filtrate contamination:

[0009] Resistivity indicates the presence of water. The measurement usesthe low frequency electrode technique. Unless there is a continuousconducting path between the electrodes, there is no sensitivity to thepresence of water. Even with a conducting path, the method is unable toseparate the effects of water volume, salinity, and flow geometry. Themeasurement is simple and often useful, but inherently nonquantitative.

[0010] Dielectric constant can distinguish oil from water, but not oneoil from another. Moreover the dielectric constant measurement dependson the flow regime of oil/water mixtures.

[0011] Flow line pressure and temperature provide no information onfluid properties.

[0012] Optical Fluid Analyzers (e.g. Schlumberger OFA) can detectcontamination in many cases. It is particularly effective when the mudfiltrate is aqueous and the flowing formation fluid is pure hydrocarbon,since there is a large contrast between water and oil in the nearinfrared band. However, it does less well when the filtrate is oilbased, or when the formation fluid is a mixture of oil and water.

[0013] Thus, no presently deployed system is generally useful fordetermining the contamination level of sampled formation fluids. Thereis a clear need for an apparatus and method which monitors contaminationwhile the sample is being taken, and indicates when contamination hasbeen reduced to an acceptably low level.

[0014] Downhole formation fluid sampling tools can withdraw samples offluids from earth formations and transport them to the surface. Thesamples are sent to fluid analysis laboratories for analysis ofcomposition and physical properties. There are many inefficienciesinherent in this process.

[0015] Only about six samples can be collected on each descent (“trip”)of the tool into the borehole. Because fluid sampling tools are deployedfrom drilling rigs, and because the rental charge for such rigs canexceed $150,000 per day in the areas where fluid sampling is most oftenconducted, economic considerations usually preclude multiple trips inthe hole. Thus, oil producing formations are almost always undersampled.

[0016] The samples undergo reversible and irreversible changes as aresult of the temperature and/or pressure changes while being brought tothe surface, and as a result of the transportation process. For example,gases come out of solution, waxes precipitate, and asphalteneschemically recombine. Irreversible changes eliminate the possibility ofever determining actual in situ fluid properties. Reversible changes aredeleterious because they occur slowly and therefore impact samplehandling and measurement efficiency.

[0017] The transportation and handling of fluids uphole entails all thedangers associated with the handling of volatile and flammable fluids athigh pressure and temperature. After analyses are complete, the samplesmust be disposed of in an environmentally acceptable manner, withassociated financial and regulatory burdens.

[0018] Because fluid analysis laboratories are frequently distant fromthe well site, there are substantial delays—often several weeks—inobtaining results. If a sample is for some reason corrupted or lostduring sampling, transportation, or measurement, there is no possibilityof returning to the well to replace it.

[0019] Thus there is a clear need for immediate analysis of fluidsamples at formation temperature and pressure within the downholesampling tool.

SUMMARY OF THE INVENTION

[0020] Nuclear magnetic resonance (NMR) can be used to monitorcontamination and analyze fluid samples in fluid sampling tools underdownhole conditions. Measurements are performed in the flow line itself.The methods are inherently noninvasive and noncontacting. Since magneticresonance measurements are volumetric averages, they are insensitive toflow regime, bubble size, and identity of the continuous phase. Nuclearmagnetic resonance of hydrogen nuclei (protons) is preferred because ofthe ubiquity and good NMR characteristics of this nuclear species.However, magnetic resonance of other nuclear species is useful and soincluded within the scope of the present invention.

[0021] In general, the methods of analyzing a fluid according to theinvention include introducing a fluid sampling tool into a well borethat traverses an earth formation. The fluid sampling tool extracts thefluid from the earth formation into a flow channel within the tool.While the fluid is in the flow channel, a static magnetic field isapplied, and an oscillating magnetic field applied. Magnetic resonancesignals are detected from the fluid and analyzed to extract informationabout the fluid.

[0022] These and other features of the invention are described in moredetail in figures and in the description below.

BRIEF DESCRIPTION OF THE DRAWINGS

[0023] A complete understanding of the present invention may be obtainedby reference to the accompanying drawings, when considered inconjunction with the subsequent detailed description, in which:

[0024]FIG. 1 illustrates a schematic diagram of one embodiment of afluid sampling tool utilized in extracting formation fluid in accordancewith the invention;

[0025]FIG. 2 shows a schematic axial section of a flow line NMRapparatus that can be utilized in the sampling tool depicted in FIG. 1;

[0026]FIG. 3 shows a schematic cross sectional view of one embodiment ofa flow line apparatus depicted in FIG. 2;

[0027]FIG. 4 depicts a flow chart of one embodiment of a method of thisinvention;

[0028]FIG. 5 depicts a graph showing the logarithmic mean T₂ plottedversus viscosity for crude oils;

[0029]FIG. 6 shows T₂ distributions for a number of crude oils having avariety of physical properties; and

[0030]FIG. 7 shows a fluid correlation chart that relates stock tank APIgravity, viscosity, gas-oil ratio and fluid temperature.

DESCRIPTION OF THE PREFERRED EMBODIMENTS Apparatus

[0031] Modem fluid sampling tools, such as Schlumberger's ModularDynamics Testing Tool (MDT) are composed of several parts which enableextraction of fluids from permeable earth formations. Referring to FIG.1, with the tool identified by 10, the following modules are in theprior art [Schlumberger Wireline Formation Testing and Sampling,SMP-7058 (1996), published by Schlumberger Wireline and Testing]: theelectric power module 11 and the hydraulic power module 12 power thetool; the probe module 13 is deployed so as to make a hydraulic sealwith the formation; and the pumpout module 17 lowers the pressure in theflow line in a controlled manner so as to extract fluid from theformation while maintaining the pressure near the original formationpressure. Samples are optionally monitored by an optical fluid analyzer(OFA) 14 and are retained for transportation to surface laboratories inthe multisample module 16.

[0032] The NMR module which is the subject of this invention is shown at15 in FIG. 1. It is built around the flow line, and provides noobstructions to the flow of fluid within the tool.

[0033] More detailed drawings of the NMR apparatus 15 are shown in FIGS.2 and 3. Fluid withdrawn from the formation flows through a flow channel21. In non-instrumented sections of the tool, the channel is defined bya thick-wall metal tube 24 capable of withstanding formation pressure ofat least 20,000 pounds per square inch.

[0034] In the NMR-instrumented section of the flow line, the channel isdefined by the inside diameter of an antenna support 22. The antennasupport must be made of a nonconductive and preferably nonmagneticmaterial. The antenna support must be capable of resisting chemicalattack by formation fluids. It must also be capable of resisting erosionby solids which may enter the flow line from the formation or borehole.Ceramics or hard polymeric materials are suitable materials for theantenna support.

[0035] The NMR antenna 23 is embedded in the antenna support. The NMRantenna must be capable of radiating magnetic field at the Larmorfrequency (see below), typically 40 MHz. This radiated magnetic field isconventionally called B₁. In one illustrative implementation, the NMRantenna is a solenoidal coil which generates an oscillating magneticfield parallel to the axis of the flow channel. The B₁ field need not beparticularly uniform over the volume of the flow channel.

[0036] The antenna support is enclosed by an enlarged portion ofthick-wall metal tube 24, so as not to obstruct the flow channel 21. Thetube 24 and antenna support 22 are able to contain the high pressureformation fluids in the flow channel. High frequency magnetic fieldscannot penetrate metals, so the NMR antenna must be placed inside themetal tube of the flow line.

[0037] An array of permanent magnets 25 is placed outside the thick-wallmetal tube. These create a constant magnetic field, conventionallycalled B₀, substantially perpendicular to the B₁ field generated by theantenna. To make chemical shift measurements (see below) B₀ ispreferably substantially uniform in the volume occupied by fluid.However, to measure relaxation time, diffusion coefficient, or spindensity of hydrogen or other elements, B₀ need not be particularlyuniform. One suitable arrangement of permanent magnets is described byHalbach [K. Halbach, Nuc. Inst. Methods 169, 1-10 (1980); K. Halbach,Nuc. Inst. Methods 187, 109-117 (1981)].

[0038] The entire NMR apparatus is enclosed in a sonde housing 26 whichis attached to other similar housings in the tool string lowered intothe well.

[0039] Gradient coils (not shown) can also be provided for the purposeof making pulsed field gradient measurements of diffusion coefficientand other quantities. If the static magnetic field is aligned with thez-axis, the most effective gradients are dB_(z)/dx, dB_(z)/dy, anddB_(z)/dz. A dB_(z)/dz gradient can be generated by a pair of saddlecoils potted together with the coil which provides the B₁ field.Prescriptions for designing saddle coils that generate maximally uniformgradients can be found in the literature [R. Turner, “Gradient CoilSystems”, Encyclopedia of Nuclear Magnetic Resonance, 1996].

NMR Technique

[0040] The techniques of nuclear magnetic resonance are well documentedin the literature [E. Fukushima and S. B. W. Roeder, “NMR, A Nuts andBolts Approach”, Addison-Wesley (1981); T. C. Farrar and E. D. Becker,“Pulse and Fourier Transform NMR”, Academic Press (1971)]. The static B₀and oscillating B₁ magnetic fields should be substantially perpendicularto each other. The B₁ antenna should be capable of transmitting andreceiving signals at the Larmor frequency f,

f=(γ/2π)B ₀  (1)

[0041] where γ is the gyromagnetic ratio of the nuclear species ofinterest, and B₀ is the strength of the static magnetic field. Forhydrogen nuclei, (γ/2π)=4258 Hz/Gauss. For values of the gyromagneticratio of other nuclei, see e.g. CRC Handbook of Chemistry and Physics[CRC Press], and the Table hereinbelow. Resonating nuclei other than ¹His accomplished by changing the frequency of operation to match theLarmor frequency of the nucleus of interest.

[0042] Before quantitative NMR measurements can be made on a fluidsample, it typically must be exposed to the static magnetic field Bo fora substantial time. The longer the exposure before the measurementbegins, the more complete the alignment of nuclear moments by Bo. Thedegree of alignment, also called polarization, is given by

P=Po(1−exp (−t/T ₁))  (2)

[0043] In this equation, t is the time that the nuclei are exposed to Bobefore the application of the B₁ field, T₁ is a time constantcharacteristic of the material, called the longitudinal relaxation time,P is the degree of polarization, and Po is the degree of polarization inthe limit that t goes to infinity. For an explanation of NMR relaxationtimes, see R. L. Kleinberg and H. J. Vinegar, “NMR Properties ofReservoir Fluids”, Log Analyst November-December 1996, pg 20-32. For oilfield fluids, T₁ can range from a few milliseconds (very viscous crudeoils) to 10 seconds (very low viscosity crude oils with dissolved gas).

[0044] All standard NMR measurements can be made using the apparatusdescribed. These include measurements of spin density (proportional toNMR signal amplitude), longitudinal and transverse relaxation times T₁and T₂ and, more generally, their distributions [R. L. Kleinberg, “WellLogging”, Encyclopedia of Nuclear Magnetic Resonance, volume 8 pg4960-4969, John Wiley & Sons, 1996]; diffusion coefficient and otherq-space measurements [P. Callaghan, “Principles of Nuclear MagneticResonance Microscopy”, Clarendon Press, 1991]; flow velocitymeasurements [A. Caprihan and E. Fukushima, “Flow Measurements by NMR”,Physics Reports, 198, 195-235 (1990)]; and chemical shift spectroscopywhen the B₀ field is sufficiently uniform [H. J. Vinegar “Method ofDetermining Preselected Properties of a Crude Oil”, U.S. Pat. No.5,306,640 (1994)].

[0045] One particularly useful NMR pulse sequence is theCarr-Purcell-Meiboom-Gill (“CPMG”) pulse sequence, and itsgeneralization, the Fast Inversion Recovery-CPMG pulse sequence[Kleinberg et al, U.S. Pat. No. 5,023,551]. Many other pulse sequencesare in common use, as cited in '551, and in the above book references.

[0046] Speed Effects

[0047] During pumpout, fluid may be moving at a high rate of speedthrough the flow line NMR apparatus. This limits polarization time andsignal acquisition time, so some types of quantitative measurements maynot be possible. However, there are a number of methods by whichcontamination can be monitored qualitatively and some by which fluid maybe analyzed quantitatively during pumpout.

[0048] The rate that fluid moves through the tool depends on thepermeability of the earth formation, the viscosity of the fluid, and therate at which fluid can be pumped through the tool. For example, in theSchlumberger MDT, the flow control module allows flows in the range1-500 cm³/s, while the pumpout module operates at speeds up to about 40cm³/s. [“Schlumberger Wireline Formation Testing and Sampling” (1996)pg. 4-29, 4-40]. The flow line has an inside diameter of about 0.5 cm,so 500 cm³/s corresponds to a flow speed of about 25.5 m/s while 40cm³/s corresponds to a flow speed of about 2 m/s. The effect of flow issimilar to the speed effect of the Schlumberger CMR [J. M. Singer, L.Johnston, R. L. Kleinberg, and C. Flaum, “Fast NMR Logging for BoundFluid and Permeability”, SPWLA 38th Annual Logging Symposium, 1997,Paper YY, Section 3].

[0049] Quantitative NMR measurements typically require that the spins befully polarized by the static magnetic field prior to data acquisition.This requires that the spins be exposed to Bo for three to five times aslong as the longitudinal relaxation time T₁. For water or light oils athigh temperature, T₁ can be several seconds; thus wait times of 10seconds or more will be required. Since the NMR apparatus is typically0.3 m long, even moderate flow speeds prevent most quantitativemeasurements from being made during pumpout. However, some quantitativemeasurements on flowing fluids, such as downhole viscosity and watercomposition, are still possible. Also, qualitative measurements todetect contamination can be made during pumpout. When contamination isat a sufficiently low level, pumping can be stopped or slowed and thefull range of quantitative measurements can be made (see below).Alternatively, these static quantitative measurements can be made whilestill pumping by diverting the flow around the sample chamber.

Measurement Overview

[0050] A typical measurement sequence is shown in FIG. 4. Fluid isadmitted into the tool flow line 41 and a measurement procedureinitiated 42. An indication of magnetic resonance, of a group describedbelow, is measured and recorded 43. While the indication changes withtime, the measurement loop is continued 44; when the indicationstabilizes 45, contamination has been reduced to a minimum.Alternatively, contamination in the fluid may be monitored by opticalmeasurements of the fluid, as described, for example, in U.S. Pat. No.6,274,865 to Schroer and Mullins. Then the flow is stopped or slowed 46and quantitative analysis is undertaken 47. At the conclusion of thequantitative analysis, the fluid in the flow line is routed to storagebottles, or is expelled to the borehole. Alternatively, as mentionedabove, some quantitative measurements may be made on the fluid withoutstopping or slowing its flow in the flow line, or a quantitativeanalysis may be made on a static fluid sample while diverting flowaround the sample chamber.

[0051] There are a wide variety of measurements that can be used tomonitor contamination, and another broad group of measurements that areuseful in quantitatively analyzing fluid properties. Some of these aredescribed below.

Contamination Monitoring Methods Using Flow Line NMR

[0052] Oil Base Mud Filtrate vs. Formation Oil

[0053] Many wells are drilled with muds in which oil is the continuousphase. These muds are comprised of hydrocarbons (“base oil”), typicallyhexadecanes, plus salt water, solids, and chemical additives. Usuallyonly the base oil, together with oil-soluble additives, enter theformation and mix with formation oils. Water and solids remain in theborehole, or form a filter cake on the borehole wall. The oil enteringthe formation is called “oil base mud filtrate”.

[0054] There are a number of NMR-detectable contrasts between oil basemud (OBM) filtrates and formation oils: (1) viscosity, (2) composition,(3) trace element content (natural or introduced), (4) diffusioncoefficient, (5) proton density, and (6) molecular conformation.

[0055] Viscosity: Extensive measurements on pure substances and crudeoils have found an excellent correlation between fluid viscosity and theNMR relaxation times T₁ and T₂ [Bloembergen et al “Relaxation Effects inNuclear Magnetic Resonance Absorption”, Physical Review 73, 679-712(1948); Morriss et al “Hydrocarbon Saturation and Viscosity Estimationfrom NMR Logging in the Belridge Diatomite”, Log Analyst, March-April1997, pg 44-59]. Morriss et al suggest that the logarithmic mean valueof the relaxation time is strongly correlated with viscosity, see FIG.5. Other relaxation time measures are also useful in qualitativelymonitoring viscosity, including the time it takes for the NMR amplitudeto fall to 1/e of its initial value.

[0056] In general, the viscosity of OBM filtrate is different (higher orlower) than that of the formation oil. Thus measurements of NMRrelaxation time can distinguish these fluids from one another. Moreover,when OBM filtrate is mixed with formation oil, the viscosity, andtherefore relaxation time, of the mixture will be intermediate betweenthe viscosities of the individual components.

[0057] As draw down continues, the time dependence of viscosity of theoil phase in the flow stream, η(t), will vary as

η(t)=η_(mf)+[η_(n)−η_(mf))f(t)]  (3)

[0058] where η_(mf) is the viscosity of the mud filtrate under downholeconditions, which can be measured in advance in a laboratory if desired,and η_(n) is the unknown viscosity of the native oil. f(t) depends onfluid and formation properties and is therefore unknown. However, f(t)is expected to be subject to the conditions that f(0)≧0, df/dt>0,d²f/dt²<0 (at least at long time), and f(∞)=1. Given a sufficiently longacquisition of data, η_(n) can be estimated from the long-time asymptoteof η(t), and contamination level at any given time can be estimated.

[0059] Relaxation Time Distribution: Oil base mud filtrates arecharacterized by a narrow distribution of relaxation times. In contrast,crude oils have broad distributions of relaxation times, see FIG. 6[Morriss et al, “Hydrocarbon Saturation and Viscosity Estimation fromNMR Logging in the Belridge Diatomite”, Log Analyst, March-April 1997,pg 44-59]. Thus even if the OBM filtrate and native crude have the sameviscosity, NMR T₁ and/or T₂ analysis can distinguish them based on thewidth of the distribution of relaxation times.

[0060] Trace Element Content: Trace elements can be detected in twoways. (1) Paramagnetic ions or compounds dissolved in liquids shortenthe NMR relaxation times of liquid protons. (2) The quantity of certainother nuclear or electronic species can be measured directly byresonance measurements of those species.

[0061] Dissolved paramagnetic compounds will reduce the protonrelaxation times of oils. Thus if two oils have the same viscosity, theywill have different relaxation times if they have substantiallydifferent paramagnetic content. While many crude oils and most oil basemud filtrates have negligible magnetic content, some crude oils havesignificant amounts of vanadium or nickel [Tissot and Welte, “PetroleumFormation and Occurrence”, Springer-Verlag, 1978, Figure IV. 1.20].Because the relaxation effect is proportional to paramagneticconcentration, the proportions of two oils in a mixture can bemonitored. Deliberate introduction of an oil-soluble paramagneticsubstance into the oil base mud can considerably enhance this effectwhen the native crude is relatively free of paramagnetic material.

[0062] NMR-active nuclei can be monitored directly to determinecontamination levels. OBM filtrates may differ from native oils byhaving substantially different concentrations of oxygen, sulfur, ornitrogen. Of these, nitrogen is the best NMR target because itsNMR-active form, ¹⁴N, has good NMR sensitivity and a reasonable naturalabundance, see Table 3 below. Considerably greater sensitivity tocontamination can be attained if trace elements are mixed with thedrilling mud to mark the filtrate. For example, a fluorine-labeledorganic compound can be detected directly by measuring the ¹⁹Fresonance.

[0063] Diffusion Coefficient: The diffusion coefficient is closelyrelated to the viscosity; they are related by the approximate relation[J. C. M. Li, P. Chang, “Self Diffusion Coefficient and Viscosity inLiquids”, J. Chem. Phys. 23, 518-520 (1955)] $\begin{matrix}{{D\quad \eta} = {c\quad k\quad {T\left( \frac{N}{V} \right)}^{1/3}}} & (4)\end{matrix}$

[0064] where D is the diffusion coefficient, η is the viscosity, c is anempirical constant, k is Boltzmann's constant, T is the absolutetemperature, and (N/V) is the number of molecules per unit volume. Thusin many cases, measurements of T₂ and diffusion coefficient areduplicative. However, T₂ is influenced by the presence of paramagneticspecies, whereas the diffusion coefficient is not. Thus diffusionmeasurements, which can be made, for example, using CPMG sequenceshaving different echo spacings and in the presence of a magnetic fieldgradient (see eqns (8) and (9), below), can be independently useful indetermining contamination levels.

[0065] NMR Amplitude: Speed effects play an important role in themeasurement of NMR amplitude, by reducing the time that the nuclearspins are exposed to the polarizing field B₀. Hydrogen NMR amplitude iscontrolled by hydrogen index and the effect of incomplete polarization:

S=V _(water) ×HI _(water)×[1−exp(−W/T _(1water))]+V _(oil) ×HI_(oil)×[1−exp(−W/T _(1oil))]+V _(gas) ×HI _(gas)×[1−exp(−W/T_(1gas))]  (5)

[0066] V_(water), V_(oil), and V_(gas) are the relative volumes ofwater, oil, and gas in the NMR measurement section of the flow line. HIis the hydrogen index (proton density relative to pure water). W is theeffective polarization time of the measurement, which is a function of avariety of parameters, including the wait time between pulse sequences,the flow rate of the fluid, the distance the fluid traveled through B₀,and the distance the fluid traveled through B₁.

[0067] Oils with API gravity greater than 20, and with no dissolved gas,have proton density equal to that of water [Vinegar et al, “Whole CoreAnalysis by ¹³C NMR”, SPE Formation Evaluation 6, 183-189 (June 1991)].Most oil mud filtrates also have hydrogen densities equal to that ofwater. Gas is always a formation fluid; it is never a part of mudfiltrates. A reduced proton density indicates gas, which isanticorrelated with the presence of mud filtrate in the flow line.

[0068] Medium-to-Heavy Oil/Oil Base Mud Filtrate: Medium to heavy oilshave short T₁, and are substantially polarized in the flow stream. Oilbase mud filtrates have T₁'s in the range of several hundredmilliseconds, and thus are not completely polarized in a rapidly movingstream. As the ratio of heavier formation oil increases, signalamplitude increases.

[0069] Light Oil and Gas/Oil Base Mud Filtrate: This is the mostimportant contamination detection problem, and the one the optical fluidanalyzer has the most trouble with. In this case, native oil has alonger relaxation time than OBM filtrate. Thus as the proportion ofnative fluid increases, the proton signal amplitude will decrease. Thepresence of free gas associated with native oil accentuates thecontrast. Signal level will stabilize at a low level when OBMcontamination has been eliminated.

[0070] Spectroscopy: In ordinary laboratory practice, NMR spectroscopycan be used to distinguish families of hydrocarbons from each other. Forexample, protons in aromatic (ring) compounds such as benzene andnaphthalene, have slightly different resonant frequency than protons inalkanes [H. J. Vinegar “Method of Determining Preselected Properties ofa Crude Oil”, U.S. Pat. No. 5,306,640 (1994)]. OBM filtrates can bedistinguished from formation oils when they have distinctive molecularconformations. Monitoring the spectrum during pumpout providesfluid-selective information. For example, T₁ changes in the oil phasecan be monitored independent of the signal from water. Incompletepolarization and hydrogen index effects reduce the amplitudes ofindividual spectral lines. The effects are the same as those affectingthe amplitude measurement. Unlike the other techniques discussed,spectroscopy requires very good uniformity of the static magnetic fieldof the NMR apparatus: typically 1 part per million or better over thesample volume.

[0071] Water Base Filtrate vs. Formation Water

[0072] Trace Element Content: NMR measurements can also help distinguishwater base mud (WBM) filtrate from formation water. There will be littleor no contrast in viscosity, diffusion coefficient, proton density, ormolecular conformation. However, the trace element content can beconsiderably different. Water soluble paramagnetic ions (either naturalof introduced) will have a strong relaxing effect, which can be used tomonitor proportions of filtrate and connate water.

[0073] The use of chromium lignosulfonate muds, or manganese tracersused for formation evaluation [Horkowitz et al, 1995 SPWLA Paper Q], addparamagnetic ions to the filtrate. These ions reduce the filtraterelaxation time. Thus they increase contrast with light oils and gas,and decrease contrast with medium to heavy oils.

[0074] Paramagnetic ion can also be introduced in the flow line. 2×10¹⁸ions/cm³ of Fe³⁺ will reduce water T₁ to 30 msec [Andrew, NuclearMagnetic Resonance (1955)]. Tis is equivalent to 54 grams FeCl₃ per 100liters of water. For flow line doping to work, the water must be thecontinuous phase, and come into contact with the source of ions.

[0075] NMR is sensitive to sodium, so if filtrate and connate water havedifferent salinity, sodium concentration provides a good measure ofcontamination. The flow line apparatus described can make NMRmeasurements of sodium by retuning the antenna to the appropriateresonance frequency. Sodium longitudinal relaxation time is 47 ms at 2MHz and room conditions. Thus the amplitude of the sodium resonance canbe measured at least semi-quantitatively during flow.

[0076] Potassium is particularly interesting because of its largeconcentration in KCl muds. Monitoring potassium NMR amplitude is adirect measure of contamination when KCl mud has been used. Thelongitudinal relaxation time of potassium in aqueous solution is 38 msec[Decter, Progress in Inorganic Chemistry 29, 285 (1982)] so speed effectis minor.

[0077] Oil vs. Water

[0078] Oil and water can be distinguished by many of the same techniquesoutlined above. Proton relaxation time differences may be based onviscosity, diffusion coefficient, paramagnetic relaxation agents, orNMR-visible trace elements. The water phase will have a very narrowrelaxation time distribution in contrast to crude oil, which often has abroad distribution. Salt water has a large sodium and/or potassium NMRsignal which will be absent in the oil phase. Sodium detection, inparticular, offers a good way of monitoring water contamination of oilsamples, even in the presence of gas. Chemical shift spectroscopy canseparate oil and water resonances.

[0079] NMR Amplitude: Medium-to-Heavy Oil/Water Base Mud Filtrate: Themore viscous the oil, the more completely it will be polarized, becauseviscous oils relax quickly and flow slowly (at least in some flowregimes). In contrast, the viscosity of produced water is less than 1centipoise, and frequently has a long relaxation time T₁. Thus the oilwill be fully polarized and the water will not. As contamination isreduced, the signal gets bigger.

[0080] Light Oil and Gas/Water Base Mud Filtrate: Water-based mudfiltrates often have relaxation times intermediate between oil-based mudfiltrates and native oils, thus the contrast in hydrogen signalamplitude is somewhat reduced as compared to oil/oil-based mud filtrate.However, hydrogen amplitude can still be used to monitor water-based mudfiltrate contamination, especially in the presence of formation gaswhich depresses the total signal as water contamination diminishes.

Quantitative Fluid Characterization with NMR

[0081] A downhole NMR instrument installed in fluid sampling tools canmake some of the most important measurements now being made in fluidanalysis laboratories. The purpose of the downhole measurements is toprovide means of making a partial analysis when the sample is taken,after which the sample can be saved for further analysis or discarded tothe borehole. In this manner an unlimited number of fluid samples can beanalyzed on each trip in the hole. The measurements are made atformation temperature and pressure, after minimum manipulation, thushelping to ensure sample integrity. Transportation and disposal problemsare minimized or eliminated.

[0082] Nuclear magnetic resonance (NMR) is a powerful fluidcharacterization technique. The volumes of individual components offluid mixtures, and some physical properties of each component, can bemeasured. The method is inherently noninvasive and noncontacting. SinceNMR measurements are volumetric averages, they are insensitive to flowregime, bubble size, and identity of the continuous phase.

[0083] The physical properties of formation fluid are determinedquantitatively by making a measurement when it has been determined thatcontamination is reduced to an acceptable level. Alternatively, fluidscan be characterized by measuring their physical properties during mudfiltrate clean up, and extrapolating the results to zero contaminationlevel.

[0084] Nuclear magnetic resonance of ¹H (protons) is preferred becauseof the ubiquity and good NMR characteristics of this nuclear species.However, magnetic resonance of other nuclear species are useful and canbe performed by the same apparatus, as detailed below. The apparatus andtechnique are the same as described above.

[0085] Volume Fractions

[0086] The calibrated NMR signal from a mixture of gas, oil, and wateris

S=V _(water) ×HI _(water)×[1−exp(−W/T _(1water))]+V _(oil) ×HI_(oil)×[1−exp(−W/T _(1oil))]+V _(gas) ×HI _(gas)×[1−exp(−W/T_(1gas))]  (6)

[0087] V_(water), V_(oil) and V_(gas) are proportional to the volumes ofeach fluid. HI (hydrogen index) is the proton density for each fluid,normalized to the proton density of water at 20° C. and 1 atmospherepressure. The last factor on each line is a correction to account forpolarization time W. When the NMR measurement is taken on a flowingfluid, polarization may not be complete, and the effective polarizationtime W would be a function of various parameters, such as the wait timebetween pulse sequences, the flow rate of the fluid, the distance thefluid traveled through B₀, and the distance the fluid traveled throughB₁.

[0088] Water, oil, and gas signals can be separated by methods describedbelow. To obtain the fluid volumes from resolved NMR signals, thehydrogen index must be determined. The situation is different for eachfluid. For charts of hydrogen index, see R. L. Kleinberg, H. J. Vinegar,Log Analyst, November-December 1996, pg. 20-32.

[0089] Water: HI_(water) is defined to be unity at room temperature andpressure; the effects of elevated temperature and pressure are tabulated[Amyx, Bass and Whiting, Petroleum Reservoir Engineering, 1960, pg 458].A larger correction to HI_(water) is due to salinity. Thus the saltcontent of the water must be known to obtain an accurate volume. Thesolubility of natural gas in water is low, and therefore does not have asignificant effect on hydrogen index.

[0090] Oil: For oil at room temperature and pressure, without dissolvedgas, hydrogen index is unity for API gravity greater than 20 [H. J.Vinegar et al, “Whole Core Analysis by 13C NMR”, SPE FormationEvaluation, 6, 183-189 (1991)], which is the range of interest for fluidsampling tools. HI_(oil) will track density as a function of temperatureand pressure. There is no generally accepted correlation betweenHI_(oil) and dissolved gas content.

[0091] Gas: HI_(gas) is in the range of 0-0.6 for oilfield conditions,so the gas signal is not negligible. HI_(gas) is a known function oftemperature and pressure, which are measured by fluid sampling tools,and chemical composition, which is not. Carbon dioxide has no proton NMRsignal, and thus may be obtained by difference when the volumes ofwater, oil, and natural gas are measured directly. At high flow rates,however, gas will not polarize significantly and will provide minimalNMR signal. One may then use an independent density measurement such asx-ray to determine the presence of gas.

[0092] Relaxation Time Analysis

[0093] Water and Oil in the Absence of Gas: Water in the tool flow lineat downhole temperature and pressure will have relaxation times ofseveral seconds. The magnetization decay of crude oils ismultiexponential, but when the downhole viscosity of oil is greater thana few centipoise, water and oil NMR signals have distinctly differentrelaxation times [R. L. Kleinberg, H. J. Vinegar, Log Analyst,November-December 1996, pg. 20-32.]. This enables oil and water signalsto be separated using a T₁ or T₂ distribution, as is familiar from NMRformation evaluation [R. L. Kleinberg and C. Flaum, “Review: NMRDetection and Characterization of Hydrocarbons in Subsurface EarthFormations”, in “Spatially Resolved Magnetic Resonance: Methods andApplications in Materials Science, Agriculture and Biomedicine”, B.Blumich, et al eds, 1998]. If the water and oil signals are wellresolved in the T₁ or T₂ distribution, in the absence of free gas, theareas under the peaks are equal to

S=V _(water) ×HI _(water)×[1−exp(−W/T _(1water))]  (7a)

[0094] and

V _(oil) ×HI _(oil)×[1−exp(−W/T _(1oil))]  (7)

[0095] respectively, where W is the effective polarization time, asdescribed previously.

[0096] The acquisition of a string of echoes via a CPMG sequence allowsone to determine the T₂ of a static sample. Once the time-domain datahas been acquired, existing inversion methods can be used to determine aT₂ distribution. T₁=T₂ for liquids in the flow line apparatus, so if T₂is measured by the CPMG pulse sequence, the polarization correction canbe accurately computed.

[0097] In the presence of a gradient field, the echo amplitude decay ina CPMG experiment is given by:

M(t)=M ₀ e ^(−t/T) ^(₂) e ⁻⁷ ² ^(G) ² ^(T) ^(_(E)) ² ^(Dt/12)  (8),

[0098] where M₀ is the equilibrium magnetization, t is the time afterthe initial rf pulse, G is the gradient, and D is the diffusion constantof the sample. The echo time, T_(E), is defined as the time between echopeaks, or equivalently, the time between refocusing pulses. Varying theecho time varies the overall decay rate and one may determine both T₂and D.

[0099] Gas Measurements: The relaxation time of gas is a function onlyof its temperature and pressure, which are measured. For free gas in theabsence of magnetic field gradients, T₁=T₂, in the range of severalseconds, and the decay is single exponential [C. Straley, “AnExperimental Investigation of Methane in Rock Materials”, SPWLA 38thAnnual Logging Symposium,1997, Paper AA]. Thus the decay time of freegas can coincide with water and light oil. Gas is distinguished fromliquids by its diffusion coefficient. Several methods may be used:

[0100] Gas Diffusion-Relaxation Method 1

[0101] (1) The transverse magnetization decay is measured by CPMG in theusual manner, and the T₂ distribution is determined. Gas relaxes withrelaxation time T_(2,bulk).

[0102] (2) The transverse magnetization decay is measured by CPMG in thepresence of a uniform, steady magnetic field gradient supplied bygradient coils. The relaxation rate of gas is then $\begin{matrix}{\frac{1}{T_{2}} = {\frac{1}{T_{2,{b\quad u\quad l\quad k}}} + \frac{\left( {\gamma \quad G\quad T_{E}} \right)^{2}D}{12}}} & (9)\end{matrix}$

[0103] where γ is the gyromagnetic ratio, G is the applied gradient,T_(E) is the CPMG echo spacing, and D is the diffusion coefficient.Since T_(2,bulk) and all these parameters are known, the twomeasurements can be readily analyzed for the gas signal.

[0104] Gas Diffusion-Relaxation Method 2

[0105] A pulsed field gradient technique can be used, analogous to thatdescribed by Kleinberg, Latour and Sezginer, U.S. patent applicationSer. No. 08/783,778, issued as U.S. Pat. No. 5,796,252 on Aug. 18, 1998,and incorporated herein by reference in its entirety.

[0106] Chemical Shift Analysis: Proton NMR chemical shift can also beused to distinguish fluids [H. J. Vinegar, U.S. Pat. No. 5,306,640(1994)]. Gas, light oil, and water have distinct chemical shifts [Dyer,Applications of Absorption Spectroscopy of Organic Compounds (1965) pg.84-85]: TMS CH₄ H₃C—C —CH₂— H₂O Shift (ppm) 10 9.77 9.1 8.7 4.7

[0107] The chemical shift of methane depends on pressure [Trappeniersand Oldenziel, Physica 82A, 581 (1976)], and whether it is in the gasphase or in solution [Rummens and Mourits, Canadian Journal of Chemistry55, 3021 (1977)].

[0108] Fluids are distinguished when the B₀ measurement field ishomogeneous to better than 1 part per million. The areas under thespectral lines are proportional to fluid volumes as described by Eqn(6). Chemical shift spectroscopy is particularly useful when oil andwater have similar relaxation times.

[0109] Carbon NMR

[0110] Carbon may be found in some formation waters, as carbonate orbicarbonate ion, but it predominates in oil and gas. Thus in many cases,a measurement of carbon amplitude gives a direct measurement ofhydrocarbon quantity. The NMR-active isotope of carbon is ¹³C, which hasa natural abundance of about 1%. At natural abundance, ¹³C-NMRvisibility is about 1.75×10⁻⁴ that of ¹H (see Table 3 below). Also, ¹³Crelaxation times tend to be long (T₁ for carbon ranges from hundreds ofmilliseconds to seconds for oils with API gravity greater than 20 orviscosity less than 100 cp), making signal accumulation slow.

[0111] Static ¹³C NMR measurements can be made with a CPMG sequence.Successive CPMG scans may be stacked and summed to improve thesignal-to-noise ratio (SNR). Summing over each echo in time (or,equivalently, looking at the dc component of each echo in frequencyspace) can further improve SNR. Additional SNR improvement may resultfrom inclusion of proper filtering.

[0112] With such improvements in SNR, it is estimated that a H/C ratiomay be determined with an error of about 4.8% in less than 5 minutes.Cross-polarization with hydrogen is expected to give a further reductionin error. [Gerstein and Dybowski, Transient Techniques in NMR of Solids,1985].

[0113] Oil Viscosity

[0114] Oil viscosity can be determined if the oil signal is resolvedfrom other fluid signals by either relaxation analysis (see above) orchemical shift analysis (see above). Also, oil viscosity can be relatedto the oil's diffusion coefficient, which may be measured usingtechniques described previously.

[0115] When relaxation analysis is used, T₁ or T₂ is measured directly.As stated above, crude oils have broad distributions of relaxationtimes. However, it has been found that oils with low viscosity relaxmore slowly than those with higher viscosity [C. E. Morriss, R.Freedman, C. Straley, M. Johnston, H. J. Vinegar, P. N. Tutunjian, inTransactions of the SPWLA 35th Annual Logging Symposium, 1994; LogAnalyst, March-April 1997, pg 44.]. A single relaxation time parameterwhich captures the viscosity dependence is the logarithmic mean:$\begin{matrix}{T_{2L\quad M} = {\exp\left\lbrack \frac{\sum\limits_{i}{m_{i}{\log_{e}\left( T_{2i} \right)}}}{\sum\limits_{i}m_{i}} \right\rbrack}} & \left( \text{10a} \right) \\{{T_{1L\quad M} = {\exp\left\lbrack \frac{\sum\limits_{i}{m_{i}{\log_{e}\left( T_{1i} \right)}}}{\sum\limits_{i}m_{i}} \right\rbrack}};} & \left( \text{10b} \right)\end{matrix}$

[0116] see also FIG. 5. It has been found that over the range 1 cp to300 cp, and in the absence of an applied magnetic field gradient,T_(1LM) and T_(2LM) (in seconds) are related to viscosity η (incentipoise): $\begin{matrix}{{T_{2L\quad M} = \frac{1.2}{\eta^{0.9}}},{a\quad t\quad 2\quad {MHz}}} & \left( \text{11a} \right) \\{{T_{1L\quad M} = \frac{1.1}{\eta^{0.5}}},{a\quad t\quad 85\quad {{MHz}.}}} & \left( \text{11b} \right)\end{matrix}$

[0117] When chemical shift analysis is used, the longitudinal relaxationtime, T₁, of each spectral line can be determined by standard methods[H. J. Vinegar U.S. Pat. No. 5,306,640 (1994)]. Then viscosity can befound from Eqns (11a) and (11b) using the fact that T₁=T₂ for crude oilsin the absence of magnetic field gradients.

[0118] Relation of oil viscosity, gas-oil ratio, stock tank API gravityand relaxation rates: Downhole oil viscosity may be obtained from NMRrelaxation rates with a correction for gas/oil ratio (GOR):$\begin{matrix}{{T_{1L\quad M} = {T_{2L\quad M} = \frac{a\quad T}{\eta_{0}{f\left( {G\quad O\quad R} \right)}}}},} & (12)\end{matrix}$

[0119] where T is the absolute temperature, η₀ is the crude oilviscosity at downhole temperature and pressure, a is an experimentallydetermined parameter with a value of 0.004 s·cp·K⁻¹ for a wide varietyof crude oils at 2 MHz, and GOR is defined as m³ solution gas per m³stock tank liquid at standard conditions (60° F., 1 atm) [R. Freeman, etal, “A New NMR Method of Fluid Characterization in Reservoir Rocks:Experimental Confirmation and Simulation Results”, SPE Annual TechnicalConference and Exhibition, SPE 63214 (2000)]. The empirically determinedf(GOR) is given by:

f(GOR)=10¹⁰ ^(α)   (13),

[0120] where

α=−0.127(log₁₀(GOR))²+1.25log₁₀(GOR)−2.80  (14).

[0121] Alternatively, f(GOR) may be fit to the following polynomialexpression:

f(GOR)=1+(3.875×10³)GOR−(5.3736×10⁻⁷)GOR ²  (15).

[0122] GOR may be determined, for example, using an optical fluidanalyzer, such as Schlumberger's OFA, which can make opticalmeasurements on a fluid in the flow line. Near infrared (NIR)absorptions of methane (CH), a principal component of downhole gas, canbe distinguished from those of methylene (—CH₂—), a dominant componentof oil, and the two correlated to GOR. [see U.S. Pat. No. 5,939,717issued Aug. 17, 1999, incorporated herein by reference in its entirety].

[0123] Once GOR and downhole viscosity are known, one may also calculatestock tank API gravity. The stock tank (i.e., standard surfacecondition, 60° F., 1 atm) API gravity (or density) of crude oil is animportant determinant of its price, and is therefore of fundamentalinterest to an operator in the field. Determining a stock tank propertyunder downhole conditions requires use of fluid property correlations,which are well-established.

[0124] One such correlation relates stock tank API gravity to downholefluid temperature (which is typically measured with downhole samplingtools, such as the MDT), GOR, and viscosity. Once downhole viscosity,GOR, and temperature have been measured, the stock tank API gravity canbe determined using a fluid correlation chart, such as that shown inFIG. 7 [R. L. Kleinberg and H. J. Vinegar, “NMR Properties of ReservoirFluids,” Log Analyst, November-December 1996, p. 28]. The lower verticalaxis of the chart marks viscosity. A horizontal line is extended fromthe viscosity value measured by NMR to a curve associated with the GORdetermined by optical analysis (or other means). From the point at whichthe viscosity value intersects with the GOR curve, a vertical line isextended to the curve associated with the fluid temperature. From thatpoint of intersection with the temperature curve, a second horizontalline is extended to the upper vertical axis, which marks the stock tankAPI gravity value. In practice, these steps are carried out by acomputer.

[0125] Oil Composition

[0126] One of the primary products of conventional fluid analysis is oilcomposition. There are two methods by which NMR can provide at least apartial composition analysis: spectroscopy and relaxation time analysis.

[0127] Spectroscopy: The NMR chemical shift depends on the molecularenvironment of a spin. Thus chemical conformation can be determined;this is one of the oldest and most widespread uses of nuclear magneticresonance. Crude oils are complex mixtures of hydrocarbons, and NMRspectroscopy is used to identify characteristic bands. For example,aliphatic protons appear in one frequency band, while aromatic protonsappear at another; both are distinguishable from water [H. J. Vinegar,U.S. Pat. No. 5,306,640 (1994)]. Chemical shift spectroscopy canperformed using either ¹H or ¹³C [Petrakis and Edelheit, AppliedSpectroscopy Reviews 15, 195 (1979); Botto, “Fossil Fuels”, Encyclopediaof Nuclear Magnetic Resonance (1996)].

[0128] Relaxation Time Analysis: The relaxation time depends oncorrelation times due to molecular motion [Bloembergen, Purcell andPound, Physical Review 73, 679 (1948)]. Protons in large molecules tendto move slower, and hence relax faster, than those in small molecules.Crude oils are mixtures of pure hydrocarbons, and have broaddistributions of relaxation times [C. E. Morriss, R. Freedman, C.Straley, M. Johnston, H. J. Vinegar, P. N. Tutunjian, in Transactions ofthe SPWLA 35th Annual Logging Symposium, 1994; Log Analyst, March-April1997, pg 44]. Oil type is determined by comparing relaxation timedistributions obtained in the fluid sampling tool to a catalogue of suchdistributions compiled from laboratory data.

[0129] Water Phase Salinity

[0130] Determination of oil saturation from deep resistivitymeasurements requires knowledge of the water resistivity, R_(W). Thepresent resistivity measurement implemented in fluid sampling tools is alow-frequency current injection technique, which is unable to measureR_(W) in the presence of hydrocarbon.

[0131] It is possible to estimate R_(W) by measuring the concentrationof current-carrying ions. Measuring individual concentrations ofdissolved ions in the water phase is also very useful in interpretingflow line nuclear measurements of density and P_(e), the photoelectricabsorption factor. The common ions in reservoir waters are [“PetroleumEngineering Handbook”, H. B. Bradley, ed., Society of PetroleumEngineers, 1992, Chapter 24]:

[0132] cations: Ca, Mg, Na anions: CO₃, HCO₃, SO₄, Cl

[0133] Among the cations, sodium often dominates, but there can besignificant quantities of calcium and magnesium in some areas. Chlorineusually dominates anion concentration, although there are some areaswhere carbonate, bicarbonate, or sulfate are important.

[0134] Solubility limits the combinations of ions that can be presentsimultaneously [CRC Handbook of Chemistry and Physics, pg B-73 et seq.].Note that solubilities can be modified by acidity, and depend ontemperature. TABLE 1 Relatively soluble combinations Cation AnionSolubility (g/l) (hot water) Na Cl 391 Na CO₃ 455 Na SO₄ 425 Ca Cl 1590Mg Cl 727 Mg SO₄ 738

[0135] TABLE 2 Relatively insoluble combinations Cation Anion Solubility(g/l) (hot water) Ca CO₃ 0.019 Ca SO₄ 0.162 Mg CO₃ 0.106

[0136] Thus high concentrations of calcium are incompatible with highlevels of carbonate or sulfate, while high levels of magnesium areincompatible with high levels of carbonate. The magnesium sulfates(epsomite, kieserite) are not particularly common minerals, andmagnesium and sulfate ion are rarely seen together at highconcentrations [Petroleum Engineering Handbook, Chapter 24]. Thusmeasuring sodium and chloride, and applying the condition of chargeneutrality, constrains the composition of oilfield waters. “Sodiumwaters” are those brines which have an excess of sodium over chloride:

[Na⁺]−[Cl⁻]=2([CO₃ ^(−−]+[SO) ₄ ⁻⁻]) for [Na⁺]−[Cl⁻]>0  (16)

[0137] “Chloride waters” are those brines which have an excess ofchloride over sodium:

[Cl⁻]−[Na⁺]=2([Ca⁺⁺]+[Mg⁺⁺]) for [Cl⁻]−[Na⁺]>0  (17)

[0138] Thus total salinity (maximum of [Na⁺] and [Cl⁻]) and an estimateof ion identity can be obtained, and used to estimate hydrogen index(see above), and water conductivity, density and Pe. The salinity isalso important in estimating parameters for determination of density bygamma ray scattering or X-ray scattering.

[0139] By changing the operating frequency of the NMR apparatus, thequantities of various isotopes can be determined. NMR properties ofcommonly occurring elements in oilfield fluids may be found in Table 3below. The best isotopes for NMR measurements are ¹H, ²³Na and ³⁵Cl. TheNMR amplitude of the sodium or chlorine resonance in an oil/watermixture will give the volume of the water phase multiplied by theconcentration of the ion. TABLE 3 NMR Properties of Elements Common inOilfield Fluids Frequency Natural NMR Isotope Frequency(¹H = 1)Abundance Sensitivity⁽¹⁾ Net sensitivity⁽²⁾ ¹H 1 1.00 1 1 ¹³C 0.2510.011 1.59 × 10⁻² 1.75 × 10⁻⁴ ¹⁴N 0.072 0.996 1.01 × 10⁻³ 1.01 × 10⁻³¹⁷O 0.136 3.7 × 10⁻⁴ 2.91 × 10⁻² 1.08 × 10⁻⁵ ¹⁹F 0.941 1.00 0.83 0.83²³Na 0.264 1.00 9.25 × 10⁻² 9.25 × 10⁻² ²⁵Mg 0.061 0.101 2.67 × 10⁻³2.70 × 10⁻⁴ ³³S 0.076 0.0076 2.26 × 10⁻³ 1.72 × 10⁻⁵ ³⁵Cl 0.098 0.7554.70 × 10⁻³ 3.55 × 10⁻³ ³⁷Cl 0.082 0.245 2.71 × 10⁻³ 6.63 × 10⁻⁴ ³⁹K0.047 0.931 5.08 × 10⁻⁴ 4.74 × 10⁻⁴

[0140] Sodium NMR: One expects ²³Na to have a much weaker NMR signalthan ¹H, due to its lower NMR sensitivity and its lower concentration inaqueous solution. For example, in a 0.057 Ω-m NaCl solution, [²³Na]=3mol/L whereas [¹H]=111 mol/L, and one expects the ²³Na signal to beabout 400 times weaker than the ¹H signal. However, ²³Na, being aspin-3/2 nucleus, exhibits quadrupolar relaxation, which gives it a T₁of about 50 ms. The relatively short T₁ aids in signal averaging, whichcan enhance SNR. For example, with a wait time of 250 ms, the ²³Na isfully polarized (>99%), and signal averaging 4096 spin echoes resultedin a 31.7 dB SNR. This reflects the echo peak amplitude compared to therms noise level without any filtering or stacking of echoes in a singleCPMG. The measurement time in this example was 17 minutes, but filteringand stacking will reduce this time to about 1 minute. Further reductionsin measurement time can be realized through optimizing the wait time.Since sodium polarizes relatively quickly, good measurements can be madeat all flow rates currently in use in fluid sampling tools.

[0141] Chlorine NMR: Chlorine has two isotopes that can be observed withNMR, ³⁷Cl and ³⁵Cl. Of the two, ³⁵Cl is the preferred isotope to observebecause of its higher natural abundance (75.53%) and its higher NMRsensitivity (0.47% relative to ¹H). Like ²³Na, ³⁵Cl is a spin-3/2nucleus and exhibits quadrupolar relaxation with relaxation times of afew milliseconds. Thus, ³⁵Cl is expected to fully polarize under anyflow conditions, with relatively short wait times, which will allow forrapid signal averaging.

[0142] Since other modifications and changes varied to fit particularoperating requirements and environments will be apparent to thoseskilled in the art, the invention is not considered limited to theexample chosen for purposes of disclosure, and covers all changes andmodifications which do not constitute departures from the true spiritand scope of this invention.

We claim:
 1. A method of analyzing fluid in a downhole environmentcomprising: a) introducing a fluid sampling tool into a well bore thattraverses an earth formation; b) using the fluid sampling tool toextract the fluid from the earth formation into a flow channel withinthe tool; c) monitoring an indication of contamination in the fluidwhile extracting the fluid from the earth formation and flowing thefluid through the flow channel; and d) when the indication ofcontamination in the fluid has stabilized, analyzing the fluid in theflow channel.
 2. The method of claim 1, wherein monitoring theindication of contamination comprises performing a magnetic resonancemeasurement on the fluid in the flow channel.
 3. The method of claim 1,wherein the indication of contamination comprises at least one of thefollowing: viscosity, relaxation time, composition, trace elementcontent, diffusion coefficient, proton density, signal amplitude,molecular conformation, and chemical shift.
 4. The method of claim 1,wherein analyzing the fluid in the flow channel comprises performing amagnetic resonance measurement on the fluid in the flow channel.
 5. Themethod of claim 4, wherein analyzing the fluid in the flow channelcomprises stopping the flow of fluid in the flow channel whileperforming the magnetic resonance measurement.
 6. The method of claim 4,wherein analyzing the fluid in the flow channel comprises slowing theflow of the fluid in the flow channel while performing the magneticresonance measurement.
 7. The method of claim 4, wherein analyzing thefluid in the flow channel comprises continuing the flow of the fluid inthe flow channel while performing the magnetic resonance measurement. 8.The method of claim 1, wherein analyzing the fluid in the flow channelcomprises determining at least one of the following: fluid volume,diffusion coefficient, relaxation time, proton chemical shift,hydrogen/carbon ratio, viscosity, stock tank API gravity, and fluidcomposition.
 9. A method of analyzing hydrocarbon in a fluid in adownhole environment comprising: a) introducing a fluid sampling toolinto a well bore that traverses an earth formation; b) using the fluidsampling tool to extract fluid from the earth formation into a flowchannel within the tool; c) applying a static magnetic field to thefluid in the flow channel; d) applying an oscillating magnetic field ata frequency sensitive to carbon-13 nuclei to the fluid in the flowchannel; e) detecting magnetic resonance signals indicative of carbon-13nuclei from the fluid; and f) analyzing the detected magnetic resonancesignals to extract information about hydrocarbon in the fluid.
 10. Themethod of claim 9, further comprising stopping the flow of the fluidthrough the flow channel prior to performing steps (c)-(e).
 11. Themethod of claim 9, wherein the oscillating magnetic field comprises aseries of oscillating magnetic field pulses.
 12. The method of claim 9,further comprising applying a second oscillating magnetic field at afrequency sensitive to hydrogen nuclei to the fluid in the flow channel.13. The method of claim 12, wherein analyzing the detected magneticresonance signals comprises decoupling the second oscillating magneticfield from the detected signals.
 14. The method of claim 9, furthercomprising applying a second oscillating magnetic field at a frequencysensitive to hydrogen-1 nuclei to the fluid in the flow channel anddetecting magnetic resonance signals indicative of hydrogen-1 nucleifrom the fluid.
 15. The method of claim 14, wherein analyzing thedetected magnetic resonance signals comprises calculating ahydrogen/carbon ratio.
 16. The method of claim 9, wherein analyzing thedetected magnetic resonance signals comprises estimating hydrocarbonquantity in the fluid.
 17. A method of analyzing water phase fluid in adownhole environment comprising: a) introducing a fluid sampling toolinto a well bore that traverses an earth formation; b) using the fluidsampling tool to extract fluid from the earth formation into a flowchannel within the tool; c) applying a static magnetic field to thefluid in the flow channel; d) applying an oscillating magnetic field tothe fluid in the flow channel; e) detecting magnetic resonance signalsindicative of nuclei of at least one of the following from the fluid:sodium-23, chlorine-35, chlorine-37, and potassium-39; and f) analyzingthe detected magnetic resonance signals to determine information aboutthe water phase fluid.
 18. The method of claim 17, further comprisingflowing the fluid through the flow channel and performing steps (c)-(e)while the fluid is flowing.
 19. The method of claim 17, wherein thedetected magnetic resonance signals are analyzed to determine salinityof the fluid.
 20. The method of claim 19, further comprising analyzingthe detected magnetic resonance signals to determine water phaseresistivity.
 21. A method of determining stock tank API gravity of acrude oil sample from downhole fluid analysis comprising: a) introducinga fluid sampling tool into a well bore that traverses an earthformation; b) using the fluid sampling tool to extract the crude oilsample from the earth formation; c) measuring a downhole temperature ofthe crude oil sample; d) determining a downhole viscosity of the crudeoil sample; e) determining a downhole gas/oil ratio of the crude oilsample; and f) correlating the dowhole temperature, viscosity andgas/oil ratio with the stock tank API gravity of the crude oil sample.22. The method of claim 21, wherein determining the downhole viscosityof the crude oil sample comprises: i) applying a static magnetic fieldto the crude oil sample; ii) applying a sequence of oscillating magneticfield pulses to the crude oil sample; iii) detecting magnetic resonancesignals from the crude oil sample; iv) determining a relaxation timeassociated with the crude oil sample; and v) relating the relaxationtime to the downhole viscosity of the crude oil sample.
 23. The methodof claim 22, wherein determining a relaxation time comprises performinga relaxation time analysis on the detected magnetic resonance signals.24. The method of claim 22, wherein determining a relaxation timecomprises performing a chemical shift analysis on the detected magneticresonance signals.
 25. The method of claim 21, wherein determining thedownhole gas/oil ratio of the crude oil sample comprises: i)transmitting near-infrared light through the crude oil sample; ii)measuring optical absorption at a first wavelength at which gas absorbsnear-infrared light; iii) measuring optical absorption at a secondwavelength at which oil absorbs near-infrared light; and iv) calculatingthe downhole gas/oil ratio based on the optical absorptions at the firstand second wavelengths.
 26. A nuclear magnetic resonance module adaptedfor incorporation into a fluid sampling tool comprising: a permanentmagnet array adapted to be arranged around a flow line in the fluidsampling tool; a nuclear magnetic resonance antenna adapted to bearranged around the flow line; means coupled with the antenna forgenerating an oscillating magnetic field within the flow line; and meanscoupled with the antenna for detecting nuclear magnetic resonancesignals from the flow line.
 27. The nuclear magnetic resonance module ofclaim 26, wherein the means for generating an oscillating magnetic fieldcomprises means for generating a sequence of oscillating magnetic fieldpulses.
 28. The nuclear magnetic resonance module of claim 26, whereinthe means for generating an oscillating magnetic field comprises meansfor varying the frequency of the oscillating magnetic field.
 29. Thenuclear magnetic resonance module of claim 28, wherein the means fordetecting nuclear magnetic resonance signals comprises means fordetecting nuclear magnetic resonance signals from more than one type ofnucleus.